<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <div>{{msg}}</div>
        <button v-on:click="res">点击反转</button>
    </div>
</body>
<script src="https://unpkg.com/vue@next"></script>
<script>
    const Eventhinding={
        data(){
            return{
                msg:'hello Vue.js'
            }
        },
        methods:{
            res(){
                this.msg=this.msg.split('').reverse('').join('')
            }

        }
    }
    Vue.createApp(Eventhinding).mount("#app")
</script>
</html>